home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / CSMP Digests / csmp-v1-041.txt < prev    next >
Encoding:
Text File  |  1992-11-18  |  41.8 KB  |  1,037 lines  |  [TEXT/MPS ]

  1. C.S.M.P. Digest             Tue, 07 Apr 92       Volume 1 : Issue 41
  2.  
  3. Today's Topics:
  4.  
  5.     How to get suggestions to Symantec about the THINK products
  6.     Animated cursors
  7.  
  8.  
  9. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  10.  
  11. These digests are available (by using FTP, account anonymous, your email
  12. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  13. edu.  This is also the home of the comp.sys.mac.programmer Frequently Asked
  14. Questions list.
  15.  
  16. These digests are also available via email.  Just send a note saying that you
  17. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  18. automatically receive each new digest as it is created.
  19.  
  20. The articles in these digests are taken directly from comp.sys.mac.programmer.
  21. They are not edited; all articles included in this digest are in their original
  22. posted form.  The only articles that are -not- included in these digests are
  23. those which didn't receive any replies (except those that give information
  24. rather than ask a question).  All replies to each article are concatenated
  25. onto the original article in the order in which they were received.  Article
  26. threads are not added to the digests until the last article added to the
  27. thread is at least one month old (this is to ensure that the thread is dead
  28. before adding it to the digests).
  29.  
  30. Send administrative mail to mkelly@cs.uoregon.edu.
  31.  
  32. -------------------------------------------------------
  33.  
  34. From: phils@chaos.cs.brandeis.edu (Phil Shapiro)
  35. Subject: How to get suggestions to Symantec about the THINK products
  36. Date: 2 Mar 92 20:20:39 GMT
  37. Organization: Symantec Corp.
  38.  
  39. >>>>> On 29 Feb 92 21:06:09 GMT, jverdega@cae.wisc.edu (Jeffrey Verdegan) said:
  40.  
  41.  > Is there some other way to get their attention besides wasting lots
  42.  > of bandwidth (like I'm doing =:-)) to send a whole boatload of
  43.  > "yes" votes to the above suggestions?  On the other hand, I'm sure
  44.  > there are other similar issues that will come up as a response to
  45.  > this.
  46.  
  47. If you want to be sure to get your opinions heard, you may want to CC:
  48. your thoughts to one of the official THINK support mailboxes. You
  49. should either mail to AppleLink at D0152@AppleLink.apple.com, or
  50. CompuServe at 76666.2005@CompuServe.com .
  51.  
  52.     -phil
  53. --
  54.    Phil Shapiro                           Technical Support Analyst
  55.    Language Products Group                     Symantec Corporation
  56.         Internet: phils@chaos.cs.brandeis.edu
  57.  
  58.  
  59.  
  60. ---------------------------
  61.  
  62. From: patrinos@rodan.acs.syr.edu (Anthony J. Patrinos)
  63. Subject: Animated cursors
  64. Date: 29 Jan 92 05:48:41 GMT
  65. Organization: Syracuse University, Syracuse, NY
  66.  
  67.  
  68. Does anybody know whre I can find info about dealing with animated curssors? I
  69. could not find any significant help in Inside Mac or X-Ref. I guess the acur
  70. resource comes ito play somehow, but I have no idea how.
  71.  
  72. Thanks in advance for your help.
  73. Tony Patrinos
  74. Syracuse University
  75.  
  76.  
  77.  
  78. - -------------------------
  79.  
  80. From: gt0657c@prism.gatech.EDU (geoff george)
  81. Subject:  Animated cursors
  82. Date: 29 Jan 92 12:56:02 GMT
  83. Organization: Georgia Institute of Technology
  84.  
  85.  
  86. I spent most of one day looking for Apple's recommended method of 
  87. animating cursors, since IM VI User Interface Guidelines say that 
  88. any decent app should at least use the spinning beach ball or 
  89. spinning watch. Nada. I found this very annoying - "You must do 
  90. so-and-so, but we won't tell you how, or support your doing so 
  91. in any way." No docs on the Finder's 'acur' (I think it is) 
  92. resources, although ResEdit knows about them. 
  93.  
  94. Maybe this just has to do with the indices to IM and the various 
  95. manifestations of the TechNotes being poor.
  96.  
  97. Anyone got any pointers?
  98.  
  99. geoff
  100. -- 
  101. geoff george    geoff@cc.gatech.edu        (my name)
  102.         or    gt0657c@prism.gatech.edu   (personal warmth from GaTech OCS)
  103.  
  104. "Ordinary f---ing people - I hate 'em. Ordinary person spends his life avoiding tense situations; repo man spends his life getting INTO tense situations."
  105.  
  106.  
  107.  
  108. - -------------------------
  109.  
  110. From: isler@grad1.cis.upenn.edu (Sylvia-Kay Isler)
  111. Subject:  Animated cursors
  112. Date: 29 Jan 92 23:10:40 GMT
  113. Organization: University of Pennsylvania
  114.  
  115. Geoff George writes:
  116. >I spent most of one day looking for Apple's recommended method of 
  117. >animating cursors, since IM VI User Interface Guidelines say that 
  118. >any decent app should at least use the spinning beach ball or 
  119. >spinning watch. Nada. I found this very annoying - "You must do 
  120. >so-and-so, but we won't tell you how, or support your doing so 
  121. >in any way." No docs on the Finder's 'acur' (I think it is) 
  122. >resources, although ResEdit knows about them. 
  123.  
  124. >Maybe this just has to do with the indices to IM and the various 
  125. >manifestations of the TechNotes being poor.
  126.  
  127. >Anyone got any pointers?
  128.  
  129. CHECK OUT THE FOLLOWING:
  130. Mactutor May 1989 pp 104 -110 "Lisa's Hourglass is Back!" 
  131.   This article describes 3 ways to animate hourglass and watch 
  132.   cursors with C code examples included.
  133.  
  134. Mactutor December 1988 pp 108
  135.   A short description (with Pascal code) of how to animate a watch
  136.   cursor.
  137.  
  138. Hope that helps.
  139. Sylvia Isler
  140. isler@grad1.cis.upenn.edu
  141.  
  142.  
  143.  
  144. - -------------------------
  145.  
  146. From: keith@Apple.COM (Keith Rollin)
  147. Subject:  Animated cursors
  148. Date: 30 Jan 92 22:35:27 GMT
  149. Organization: Apple Computer Inc., Cupertino, CA
  150.  
  151. In article <47010@hydra.gatech.EDU> gt0657c@prism.gatech.EDU (geoff george) writes:
  152. >
  153. >I spent most of one day looking for Apple's recommended method of 
  154. >animating cursors, since IM VI User Interface Guidelines say that 
  155. >any decent app should at least use the spinning beach ball or 
  156. >spinning watch. Nada. I found this very annoying - "You must do 
  157. >so-and-so, but we won't tell you how, or support your doing so 
  158. >in any way." No docs on the Finder's 'acur' (I think it is) 
  159. >resources, although ResEdit knows about them. 
  160. >
  161. >Maybe this just has to do with the indices to IM and the various 
  162. >manifestations of the TechNotes being poor.
  163. >
  164. >Anyone got any pointers?
  165.  
  166. If you are using MPW, you can use the CursorCtl library that is
  167. provided. The MPW documentation documents the calls in this library,
  168. and describes how to use the 'acur' resource.
  169.  
  170. If you are using THINK whatever, I believe that you will have to write
  171. your own animated cursor routines. In that case, the entry you want to
  172. look up in Apple's documentation is SetCursor. There's no magic. Simply
  173. call SetCursor with a different cursor at regular intervals.
  174.  
  175. (Side note: It really upsets me that people have to ask this question
  176. all the time. First, it upsets me that people can't figure out on their
  177. own how to spin a cursor. It's just not that hard. GetCursor,
  178. SetCursor, repeat. What's so tough? Second, most people on this net use
  179. THINK C or THINK Pascal, neither of which include the spinning cursor
  180. libraries (someone please correct me if I'm wrong). Apple provides
  181. Symantec with its headers and libraries. I assume that that includes
  182. the CursorCtl library. If so, then shame on Symantec for not releasing it.
  183. If not, then shame on Apple for not providing the library to Symantec, and
  184. shame on Symantec for not providing a replacement library.)
  185.  
  186. -- 
  187. - ----------------------------------------------------------------------------
  188. Keith Rollin           ---            <Taligent .signature under construction>
  189. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  190.  
  191.  
  192.  
  193. - -------------------------
  194.  
  195. From: orpheus@reed.edu (P. Hawthorne)
  196. Subject:  Animated cursors
  197. Date: 31 Jan 92 06:42:39 GMT
  198. Organization: Reed College, Portland OR
  199.  
  200.  
  201.   keith@Apple.COM (Keith Rollin) writes:
  202.   Side note: It really upsets me that people have to ask this question
  203.   all the time. First, it upsets me that people can't figure out on their
  204.   own how to spin a cursor. It's just not that hard. GetCursor,
  205.   SetCursor, repeat. What's so tough? 
  206.  
  207.   Now, Keith, remember that there is a certain amount of dogmatism coming
  208. from Apple about anything that involves the interface, much less anything
  209. that involves using toolbox calls or affects the screen. 
  210.   Not that it took me more than half an hour to cope with animated cursors,
  211. mind you, it's just that one ought to forgive caution on these issues.
  212.  
  213.   If it's really a hassle, roll it into the toolbox.
  214.   Lest we forget, MPW and MacApp are not the toolbox and it is wrong for
  215. Apple to assume that developers must have them. For those who do not have
  216. those products, pointing out how they include solutions to problems is
  217. rather like using a cruel inside joke. 
  218.  
  219.   It seems almost, perish the thought, like something IBM would do.
  220. Monolithic and impenetrable are phrases that I would imagine that Apple
  221. as a whole should be avoiding like the plague.
  222.  
  223.   
  224.   Q: What do you get when you cross Apple with IBM?
  225.   A: IBM. -- from R.H.F.       Theus (orpheus@reed)
  226.  
  227.  
  228.  
  229. - -------------------------
  230.  
  231. From: braun-eric@CS.YALE.EDU (Eric E. Braun)
  232. Subject:  Animated cursors
  233. Date: 31 Jan 92 06:43:25 GMT
  234. Organization: Yale University Computer Science Dept., New Haven, CT 06520-2158
  235.  
  236. >  [ Stuff about animating a cursor deleted]
  237. >(Side note: It really upsets me that people have to ask this question
  238. >all the time. First, it upsets me that people can't figure out on their
  239. >own how to spin a cursor. It's just not that hard. GetCursor,
  240. >SetCursor, repeat. What's so tough?
  241.  
  242. Ok, but lets say you want to spin a cursor so that it's always ultra
  243. smooth, say from a time manager interrupt, now IM claims that
  244. SetCursor doesn't move memory, but when you actually try this occasionally
  245. you get a letftover cursor on the screen.
  246.  
  247.  
  248.  
  249. - -------------------------
  250.  
  251. From: keith@Apple.COM (Keith Rollin)
  252. Subject:  Animated cursors
  253. Date: 3 Feb 92 02:48:48 GMT
  254. Organization: Apple Computer Inc., Cupertino, CA
  255.  
  256. In article <1992Jan31.064325.20486@cs.yale.edu> braun-eric@CS.YALE.EDU (Eric E. Braun) writes:
  257. >>  [ Stuff about animating a cursor deleted]
  258. >>(Side note: It really upsets me that people have to ask this question
  259. >>all the time. First, it upsets me that people can't figure out on their
  260. >>own how to spin a cursor. It's just not that hard. GetCursor,
  261. >>SetCursor, repeat. What's so tough?
  262. >
  263. >Ok, but lets say you want to spin a cursor so that it's always ultra
  264. >smooth, say from a time manager interrupt, now IM claims that
  265. >SetCursor doesn't move memory, but when you actually try this occasionally
  266. >you get a letftover cursor on the screen.
  267.  
  268. That's a different kettle of fish that dealing with calls that move
  269. memory at interrupt time. When changing the cursor at interrupt time,
  270. you have to make sure that QuickDraw isn't busy futzing with it. To
  271. ensure this, check the semaphore 'crsrBusy', which is a byte in
  272. low-memory. If it is zero, it's safe to change the cursor. I think the
  273. sample code in the DTS Q&A stack shows how to do this.
  274.  
  275. None of this is relevent to the developer spinning the cursor in a
  276. synchronous manner (i.e., by inserting calls to a SpinCursor routine at
  277. regular intervals in her code).
  278.  
  279. -- 
  280. - ----------------------------------------------------------------------------
  281. Keith Rollin           ---            <Taligent .signature under construction>
  282. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  283.  
  284.  
  285.  
  286. - -------------------------
  287.  
  288. From: ksand@apple.com (Kent Sandvik)
  289. Subject:  Animated cursors
  290. Date: 1 Feb 92 23:27:20 GMT
  291. Organization: MacDTS Mongols
  292.  
  293. In article <1992Jan29.004842.5491@newstand.syr.edu>, patrinos@rodan.acs.syr.edu (Anthony J. Patrinos) writes:
  294. > Does anybody know whre I can find info about dealing with animated curssors? I
  295. > could not find any significant help in Inside Mac or X-Ref. I guess the acur
  296. > resource comes ito play somehow, but I have no idea how.
  297.  
  298. The Developer CD has sample code that shows how to create animated
  299. cursors. Mark Johnson told me (Hi Mark, you're not here at the
  300. office this Saturday?) that all the snippets and samples from the CD
  301. are on ftp.apple.com, so check out for a folder/directory called
  302. Animated cursors, should be inside the Development platforms folder/directory.
  303.  
  304. Kent Sandvik
  305. - ----
  306. no signature, man, this is out of this world...
  307.  
  308.  
  309.  
  310. - -------------------------
  311.  
  312. From: lsr@Apple.COM (Larry Rosenstein)
  313. Subject:  Animated cursors
  314. Date: 3 Feb 92 19:53:48 GMT
  315. Organization: Object Based Systems, Apple Computer, Inc.
  316.  
  317. In article <1992Jan31.064325.20486@cs.yale.edu> braun-eric@CS.YALE.EDU (Eric E. Braun) writes:
  318. >
  319. >Ok, but lets say you want to spin a cursor so that it's always ultra
  320. >smooth, say from a time manager interrupt, now IM claims that
  321. >SetCursor doesn't move memory, but when you actually try this occasionally
  322. >you get a letftover cursor on the screen.
  323.  
  324. First, I don't know that you want to spin the cursor from an interrupt.  If
  325. the idea is to show that the task is making progress, then it's wrong spin
  326. the cursor if the program is really hung in a loop.  Instead, you should
  327. spin the cursor as the program makes progress.
  328.  
  329. Second, if you do change the cursor from an interrupt then you are messing
  330. with data structures that the system might be changing at the same time.  I
  331. think there's a flag (CrsrBusy?) that indicates whether the cursor is
  332. changing, and your routine has to check that and skip changing the cursor if
  333. it is being changed already.
  334.  
  335. -- 
  336. Larry Rosenstein, Apple Computer, Inc.
  337.  
  338. lsr@apple.com
  339. (or AppleLink: Rosenstein1)
  340.  
  341.  
  342.  
  343. - -------------------------
  344.  
  345. From: ABSURD@applelink.apple.com (Tim Dierks, ToyMeister, Cray abuser)
  346. Subject:  Animated cursors
  347. Date: 3 Feb 92 21:17:20 GMT
  348. Organization: MacDTS, Apple Computer
  349.  
  350. In article <1992Jan31.064325.20486@cs.yale.edu>, braun-eric@CS.YALE.EDU (Eric E. Braun) writes:
  351. > >  [ Stuff about animating a cursor deleted]
  352. > >(Side note: It really upsets me that people have to ask this question
  353. > >all the time. First, it upsets me that people can't figure out on their
  354. > >own how to spin a cursor. It's just not that hard. GetCursor,
  355. > >SetCursor, repeat. What's so tough?
  356. > Ok, but lets say you want to spin a cursor so that it's always ultra
  357. > smooth, say from a time manager interrupt, now IM claims that
  358. > SetCursor doesn't move memory, but when you actually try this occasionally
  359. > you get a letftover cursor on the screen.
  360.  
  361. This is true; if changing a cursor from a Time Manager task, you should
  362. check to make sure that the low memory global CrsrBusy (a byte at location
  363. 8CD) is false.
  364.  
  365. However, I personally (and I am _not_ even remotely speaking from an Apple
  366. perspective here) urge you to not change your cursor from a VBL or Time
  367. Manager task without looking towards whether you're actually making progess.
  368. More than a few times I've seen applications which would get hung in an
  369. infinite loop, with the cursor merrily spinning away, totally uncoupled
  370. from the application's actual state.  The purpose of spinning cursors is
  371. (IMHO) to tell people that something is really going on; not to provide
  372. entertainment for users forced to wait.  If you want to entertain your
  373. users, make your program MultiFinder-friendly; that way we can all switch
  374. out and play Spaceward Ho! while your program is mangling widgit figures.
  375.  
  376. Tim Dierks
  377. MacDTS, but I speak for myself
  378. First out, twice, Ho-Down '92
  379.  
  380.  
  381.  
  382. - -------------------------
  383.  
  384. From: michael@otago.ac.nz
  385. Subject:  Animated cursors
  386. Date: 4 Feb 92 20:28:38 GMT
  387. Organization: University of Otago, Dunedin, New Zealand
  388.  
  389.  
  390. Speaking of animated cursors, is there (or should there be) a standard animated
  391. cursor? I mean, we use the standard arrow/I-beam/watch cursors in the name of
  392. consistency so that users feel comfortable with them, so is there any
  393. documentation that says we ought to stick to either the animated watch or the
  394. beachball? I raise this because I had what I thought was a rather cute rotating
  395. bulldozer in UpdateMaker, but I struck a few people who were troubled by it
  396. because they didn't recognise it.
  397.  
  398. Furthermore, on discussing this with colleagues the point was made that the
  399. animated watch has somehow come to mean "I am waiting for something" whereas
  400. the beachball means "I am doing Serious Processing" - but no-one was able to
  401. say where this notion had come from.
  402.  
  403.  
  404. Michael(tm) Hamel, Computing Services Centre, University of Otago, New Zealand
  405.  
  406. TOCKHOLES (pl. n.)                 
  407. The tiny meaningless perforations which infest brogues.
  408.  
  409.  
  410.  
  411. - -------------------------
  412.  
  413. From: lim@iris.ucdavis.edu (Lloyd Lim)
  414. Subject:  Animated cursors
  415. Date: 4 Feb 92 00:19:30 GMT
  416. Organization: U.C. Davis - Department of Electrical Engineering and Computer Science
  417.  
  418. In article <1992Jan31.064325.20486@cs.yale.edu> braun-eric@CS.YALE.EDU (Eric E. Braun) writes:
  419. >>  [ Stuff about animating a cursor deleted]
  420. >>(Side note: It really upsets me that people have to ask this question
  421. >>all the time. First, it upsets me that people can't figure out on their
  422. >>own how to spin a cursor. It's just not that hard. GetCursor,
  423. >>SetCursor, repeat. What's so tough?
  424. >
  425. >Ok, but lets say you want to spin a cursor so that it's always ultra
  426. >smooth, say from a time manager interrupt, now IM claims that
  427. >SetCursor doesn't move memory, but when you actually try this occasionally
  428. >you get a letftover cursor on the screen.
  429.  
  430. This is a bad thing to do.  Sure, it will look smoother but remember the
  431. purpose of a busy cursor is to give feedback to the user.  If your program
  432. locks up, the user will be able to tell that something is wrong because
  433. the cursor hasn't spun in say five minutes.  If the cursor is too jerky,
  434. then you probably aren't giving enough time to background tasks either.
  435.  
  436. You might want to spin a cursor smoothly for something else, like a game,
  437. but the original thread was about normal busy cursors.
  438.  
  439. +++
  440. Lloyd Lim     Internet: lim@iris.cs.ucdavis.edu
  441.               America Online: LimUnltd
  442.               Compuserve: 72647,660
  443.               US Mail: 224 Lysle Leach Hall, U.C. Davis, Davis, CA 95616
  444.  
  445.  
  446.  
  447. - -------------------------
  448.  
  449. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  450. Subject:  Animated cursors
  451. Date: 6 Feb 92 21:22:51 GMT
  452. Organization: University of Waikato, Hamilton, New Zealand
  453.  
  454. There've been a number of people in this thread who've suggested that
  455. animating a cursor from an interrupt routine is somehow not entirely
  456. honest, since it doesn't guarantee that the code that is running is actually
  457. making any progress.
  458.  
  459. I used to think this too, but now I'm not so sure. Consider this: a cursor
  460. animation that is run by periodic calls from non-interrupt code still
  461. doesn't guarantee that the code isn't stuck in an endless loop.
  462.  
  463. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  464. Computer Services Dept                     fax: +64-7-838-4066
  465. University of Waikato            electric mail: ldo@waikato.ac.nz
  466. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  467. Any opinions the author has expressed in this posting are sacred to
  468. Epimetheus, the Greek god of hindsight.
  469.  
  470.  
  471.  
  472. - -------------------------
  473.  
  474. From: eyes@cs.ubc.ca (Eye Care Centre)
  475. Subject:  Animated cursors
  476. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  477. Date: Fri, 7 Feb 92 04:28:04 GMT
  478.  
  479. In article <1992Feb7.102251.6453@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  480. >
  481. >I used to think this too, but now I'm not so sure. Consider this: a cursor
  482. >animation that is run by periodic calls from non-interrupt code still
  483. >doesn't guarantee that the code isn't stuck in an endless loop.
  484.  
  485. I beg to differ. The spinning cursor is supposed to be a PPPI* and, as such,
  486. is supposed to be indicating progress. Therefore, the watch should be spun
  487. when progress is made which is different then spinning the cursor once through
  488. a given loop. Therefore, if the cursor is spinning in an infinite loop, then
  489. it is being spun on the wrong condition. (Note: There may be some examples
  490. where it is not possible to think of a good condition upon which to spin the
  491. cursor but I haven't come across any yet. This doesn't mean that there aren't
  492. any.)
  493.  
  494. Bill Kiss
  495. Dept. of Ophthalmology, UBC
  496. - --------------------------------------
  497. *PPPI - Poor Person's Progress Indicator
  498.  
  499.  
  500.  
  501. - -------------------------
  502.  
  503. From: bts39313@uxa.cso.uiuc.edu (Benjamin T Sander)
  504. Subject:  Animated cursors
  505. Date: 9 Feb 92 05:21:38 GMT
  506. Organization: University of Illinois at Urbana
  507.  
  508. Lawrence D'Oliveiro writes:
  509.  
  510. I used to think this too, but now I'm not so sure. Consider this: a cursor
  511. animation that is run by periodic calls from non-interrupt code still
  512. doesn't guarantee that the code isn't stuck in an endless loop.
  513.  
  514.  
  515.  
  516.  
  517.  
  518. See the "C Workshop" in the March 1991 Mac Tutor for the artical "Animated
  519. Color Cursors", which discusses spinning the cursor with a VBL task that must
  520. be refreshed by periodic calls from the main non-interrupt program.  
  521.  
  522. I implemented something like this, but wasn't real happy with the results.
  523. The smooth cursor made processing look too easy; somehow an erratically
  524. spinning cursor gives the illusion that the machine is working so hard 
  525. doing important stuff that it doesn't have the time to mess with trivialities
  526. like a spinning cursor.
  527.  
  528. Oh, well....
  529.  
  530.  
  531. Ben Sander
  532.  
  533.  
  534.  
  535. - -------------------------
  536.  
  537. From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  538. Subject:  Animated cursors
  539. Date: 9 Feb 92 06:02:27 GMT
  540. Organization: University of Illinois at Urbana
  541.  
  542. bts39313@uxa.cso.uiuc.edu (Benjamin T Sander) writes:
  543.  
  544. >Lawrence D'Oliveiro writes:
  545. >The smooth cursor made processing look too easy; somehow an erratically
  546. >spinning cursor gives the illusion that the machine is working so hard 
  547. >doing important stuff that it doesn't have the time to mess with trivialities
  548. >like a spinning cursor.
  549.  
  550. Yeah, right, try using MPW sometime. It spins the cursor so damn hard it looks
  551. like it's doing *nothing but* spinning it. Reminds me of the ThinkC "why display
  552. the numbers if it costing you so much time" question. I'd much rather it used
  553. a VBL and counter than spin the stupid thing once every time through its loop.
  554. -- 
  555. Mark Lanett                                                   mlanett@uiuc.edu
  556. Software Tools Group, NCSA, University of Illinois at Urbana-Champaign
  557.  
  558.  
  559.  
  560. - -------------------------
  561.  
  562. From: mhkohne@jupiter.cs.umbc.edu (Michael Kohne)
  563. Subject:  Animated cursors
  564. Date: 9 Feb 92 15:22:09 GMT
  565. Organization: University of Maryland Baltimore Campus, Computer Science Department
  566.  
  567. In article <62393@apple.Apple.COM> keith@Apple.COM (Keith Rollin) writes:
  568. >In article <1992Jan31.064325.20486@cs.yale.edu> braun-eric@CS.YALE.EDU (Eric E. Braun) writes:
  569.   [ Stuff about animating a cursor deleted]
  570. >
  571. >That's a different kettle of fish that dealing with calls that move
  572. >memory at interrupt time. When changing the cursor at interrupt time,
  573. >you have to make sure that QuickDraw isn't busy futzing with it. To
  574. >ensure this, check the semaphore 'crsrBusy', which is a byte in
  575. >low-memory. If it is zero, it's safe to change the cursor. I think the
  576. >sample code in the DTS Q&A stack shows how to do this.
  577. >
  578. >None of this is relevent to the developer spinning the cursor in a
  579. >synchronous manner (i.e., by inserting calls to a SpinCursor routine at
  580. >regular intervals in her code).
  581. >
  582. >-- 
  583. >------------------------------------------------------------------------------
  584. >Keith Rollin           ---            <Taligent .signature under construction>
  585. >Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  586.  
  587. You know, that's interesting. I've been having problems with ShieldCursor
  588. and ShowCursor. I'm calling Shieldcursor from an interrupt routine, and I'm
  589. getting cursor's 'left over' on the screen myself. Same problem, 
  590.  
  591. -- 
  592. "Pope" Q.E.D         Lord High Jabberwocky
  593. Michael Kohne        mhkohne@jupiter.cs.umbc.edu
  594. Coded Message: FIME NDUXXMS MZP FTQ EXUFTK FAHQE SKDQ MZP SUYNXQ UZ FTQ IMNQ.
  595.  
  596.  
  597.  
  598. - -------------------------
  599.  
  600. From: james@astro.as.utexas.edu (James McCartney)
  601. Subject:  Animated cursors
  602. Date: 9 Feb 92 17:02:45 GMT
  603. Organization: University of Texas, McDonald Observatory
  604.  
  605. In article <1992Feb9.060227.9384@ux1.cso.uiuc.edu> mlanett@void.ncsa.uiuc.edu (Mark Lanett) writes:
  606. >bts39313@uxa.cso.uiuc.edu (Benjamin T Sander) writes:
  607. >>Lawrence D'Oliveiro writes:
  608. >>The smooth cursor made processing look too easy; somehow an erratically
  609. >>spinning cursor gives the illusion that the machine is working so hard 
  610. >>doing important stuff that it doesn't have the time to mess with trivialities
  611. >>like a spinning cursor.
  612. >Yeah, right, try using MPW sometime. It spins the cursor so damn hard it looks
  613. >like it's doing *nothing but* spinning it. Reminds me of the ThinkC "why display
  614. >the numbers if it costing you so much time" question. I'd much rather it used
  615. >a VBL and counter than spin the stupid thing once every time through its loop.
  616.  
  617.     What I do in my spin cursor routine is to check TickCount and only spin
  618. the cursor if a few ticks have passed since the last time. If it is time
  619. to spin it I reset the time for the next spin. This way I get spinning
  620. only if the program is actually doing something, but I don't get all the
  621. cost of the SetCursor call each time and the cursor spins a a steady rate.
  622. BTW: Using Ticks is faster than TickCount if you want to be evil and use a
  623. low memory global.
  624.  
  625.    --- james mccartney 
  626. .
  627. .  void *sig;
  628. .
  629.  
  630.  
  631.  
  632. - -------------------------
  633.  
  634. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  635. Subject:  Animated cursors
  636. Organization: Kalamazoo College
  637. Date: Mon, 10 Feb 1992 13:41:41 GMT
  638.  
  639. james@astro.as.utexas.edu (James McCartney) writes:
  640. >
  641. >BTW: Using Ticks is faster than TickCount if you want to be evil and use a
  642. >low memory global.
  643. >
  644.  
  645. ...and if you don't mind crashing on A/UX...
  646. -- 
  647.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  648.  Kzoo randomly kills all my mail;  if I don't acknowledge, try resending.    
  649.  
  650.  
  651.  
  652. - -------------------------
  653.  
  654. From: keith@Apple.COM (Keith Rollin)
  655. Subject:  Animated cursors
  656. Date: 10 Feb 92 21:31:57 GMT
  657. Organization: Apple Computer Inc., Cupertino, CA
  658.  
  659. In article <1992Feb9.060227.9384@ux1.cso.uiuc.edu> mlanett@void.ncsa.uiuc.edu (Mark Lanett) writes:
  660. >bts39313@uxa.cso.uiuc.edu (Benjamin T Sander) writes:
  661. >
  662. >>Lawrence D'Oliveiro writes:
  663. >>The smooth cursor made processing look too easy; somehow an erratically
  664. >>spinning cursor gives the illusion that the machine is working so hard 
  665. >>doing important stuff that it doesn't have the time to mess with trivialities
  666. >>like a spinning cursor.
  667. >
  668. >Yeah, right, try using MPW sometime. It spins the cursor so damn hard it looks
  669. >like it's doing *nothing but* spinning it. Reminds me of the ThinkC "why display
  670. >the numbers if it costing you so much time" question. I'd much rather it used
  671. >a VBL and counter than spin the stupid thing once every time through its loop.
  672.  
  673. I don't think you should "much rather it" do that. Jebber (that's
  674. American for "did you ever" for our international friends) wonder how
  675. all your MPW tools magically got the ability to switch MPW 3.0 to the
  676. background under MultiFinder?  It's because MPW puts a patch on
  677. SetCursor that calls WaitNextEvent. This way, any tool that calls
  678. SpinCursor or RotateCursor at regular intervals will allow MPW to be
  679. switched into the background. This couldn't be done if the cursor were
  680. spun at interrupt time.
  681.  
  682. It's this same patch that allows MPW 3.2 to update its windows and handle
  683. mouse down and activate events while any generic tool is running, so
  684. long as it calls SpinCursor or RotateCursor.
  685.  
  686. -- 
  687. - ----------------------------------------------------------------------------
  688. Keith Rollin           ---            <Taligent .signature under construction>
  689. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  690.  
  691.  
  692.  
  693. - -------------------------
  694.  
  695. Subject:  Animated cursors
  696. From: Bruce.Hoult@actrix.gen.nz (Bruce Hoult)
  697. Date: Tue, 11 Feb 1992 08:59:05 GMT
  698. Organization: Actrix Information Exchange, Wellington, New Zealand
  699.  
  700. ldo@waikato.ac.nz (Lawrence D'Oliveiro) writes:
  701.  
  702. >I used to think this too, but now I'm not so sure. Consider this: a cursor
  703. >animation that is run by periodic calls from non-interrupt code still
  704. >doesn't guarantee that the code isn't stuck in an endless loop.
  705.  
  706. That's true, but such a problem is of a nature that is likely to be
  707. discovered and fixed during testing.  A VBL-animated cursor is quite
  708. -- 
  709. Bruce.Hoult@bbs.actrix.gen.nz   Twisted pair: +64 4 477 2116
  710. BIX: brucehoult                 Last Resort:  PO Box 4145 Wellington, NZ
  711. "Cray's producing a 200 MIPS personal computer with 64MB RAM and a 1 GB
  712. hard disk that fits in your pocket!"   "Great!  Is it PC compatable?"
  713.  
  714.  
  715.  
  716. - -------------------------
  717.  
  718. From: kent@sunfs3.Camex.COM (Kent Borg)
  719. Subject:  Animated cursors
  720. Date: 11 Feb 92 19:46:48 GMT
  721. Organization: Camex Inc., Boston MA
  722.  
  723. In article <1992Feb7.102251.6453@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  724. >There've been a number of people in this thread who've suggested that
  725. >animating a cursor from an interrupt routine is somehow not entirely
  726. >honest, since it doesn't guarantee that the code that is running is actually
  727. >making any progress.
  728. >
  729. >I used to think this too, but now I'm not so sure. Consider this: a cursor
  730. >animation that is run by periodic calls from non-interrupt code still
  731. >doesn't guarantee that the code isn't stuck in an endless loop.
  732.  
  733.  
  734. I want more than progress.  I would like to suggest that the animating
  735. of a cursor not just tell me that the front app is happy and making
  736. progress, but that the machine in general has not come to a hault.  I
  737. like it when an animating cursor means that Get/WaitNextEvent is being
  738. called.
  739.  
  740. So, yes, the front application might be stuck in an endless loop of
  741. its own, but if Get/WaitNextEvent is being called then my download
  742. hasn't crashed in the background, and I can switch to other
  743. applications and save my work before I try to blow away the dead one
  744. or just restart.
  745.  
  746. I say animate every several calls to GetNextEvent--and call
  747. GetNextEvent frequently enough to be cooperative with the rest of the
  748. machine.  (And certainly frequently enough to notice whether the user
  749. has clicked your Cancel button--we all have one for long operations,
  750. right?--or presses cmd-. --we do check for that, right?)
  751.  
  752.  
  753. --
  754. Kent Borg                            internet: kent@camex.com   AOL: kent borg
  755.                                             H:(617) 776-6899  W:(617) 426-3577
  756. "Eating healthy beef is not healthful, the steer will take offense at you
  757. chewing on his flanks."      -me
  758.  
  759.  
  760.  
  761. - -------------------------
  762.  
  763. From: ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University)
  764. Subject:  Animated cursors
  765. Date: 12 Feb 92 15:01:33 +1300
  766. Organization: University of Waikato, Hamilton, New Zealand
  767.  
  768. In article <1992Feb11.144648.17222@sunfs3.Camex.COM>, kent@sunfs3.Camex.COM
  769. (Kent Borg) writes, in reply to my suggestion that animating a cursor
  770. by periodic calls is no guarantee that the code isn't stuck in an endless
  771. loop:
  772.  
  773. > I want more than progress.  I would like to suggest that the animating
  774. > of a cursor not just tell me that the front app is happy and making
  775. > progress, but that the machine in general has not come to a hault.  I
  776. > like it when an animating cursor means that Get/WaitNextEvent is being
  777. > called.
  778. >
  779. > So, yes, the front application might be stuck in an endless loop of
  780. > its own, but if Get/WaitNextEvent is being called then my download
  781. > hasn't crashed in the background, and I can switch to other
  782. > applications and save my work before I try to blow away the dead one
  783. > or just restart.
  784.  
  785. This is a good point that I admit I completely forgot about: calling
  786. Get/WaitNextEvent periodically means that other processes continue to run,
  787. regardless of whether you're making progress or not. And while you're
  788. making such calls, this is as good a time as any to do cursor animation.
  789.  
  790. > I say animate every several calls to GetNextEvent--and call
  791. > GetNextEvent frequently enough to be cooperative with the rest of the
  792. > machine.  (And certainly frequently enough to notice whether the user
  793. > has clicked your Cancel button--we all have one for long operations,
  794. > right?--or presses cmd-. --we do check for that, right?)
  795.  
  796. I must admit I look on command-period as one of those slightly arcane
  797. things that not every Mac user necessarily knows about. I prefer putting
  798. up a dialog box with a "Stop" or "Cancel" button on it (whichever is
  799. appropriate), that the user can click, and I don't bother checking for
  800. command-period at all. Or command-full-stop, as some of us may prefer to call
  801. it :-).
  802.  
  803. OK, now that we have a rationale for periodic Get/WaitNextEvent calls
  804. that we can all agree on, how about some guidelines for actually doing it?
  805.  
  806. In a couple of the programs I've written, I have a sort of "usertask"
  807. routine that gets called once around every loop. This usertask then
  808. checks the value of TickCount against a previous call, and only spins
  809. the cursor and calls Get/WaitNextEvent if at least 6 ticks (0.1 second)
  810. have elapsed. This causes the cursor to spin smoothly, regardless of how
  811. fast the loops are executing, while hopefully keeping to a minimum the
  812. CPU overhead involved in doing so. And it's a good way to spot places
  813. where I forgot to call my usertask, as when the program gets to such a
  814. place, the cursor animation starts to become jerky.
  815.  
  816. I've found that clicking a "Stop" button and having it respond in a
  817. maximum of 0.1 second seems pretty much instantaneous.
  818.  
  819. Lawrence D'Oliveiro                       fone: +64-7-856-2889
  820. Computer Services Dept                     fax: +64-7-838-4066
  821. University of Waikato            electric mail: ldo@waikato.ac.nz
  822. Hamilton, New Zealand    37^ 47' 26" S, 175^ 19' 7" E, GMT+13:00
  823. "OS/2 is alive," claims Elvis fan.
  824.  
  825.  
  826.  
  827. - -------------------------
  828.  
  829. From: lim@iris.ucdavis.edu (Lloyd Lim)
  830. Subject:  Animated cursors
  831. Date: 13 Feb 92 00:01:53 GMT
  832. Organization: U.C. Davis - Department of Electrical Engineering and Computer Science
  833.  
  834. In article <1992Feb12.150133.6519@waikato.ac.nz> ldo@waikato.ac.nz (Lawrence D'Oliveiro, Waikato University) writes:
  835. >In article <1992Feb11.144648.17222@sunfs3.Camex.COM>, kent@sunfs3.Camex.COM
  836. >(Kent Borg) writes, in reply to my suggestion that animating a cursor
  837. >by periodic calls is no guarantee that the code isn't stuck in an endless
  838. >loop:
  839. >
  840. >> I say animate every several calls to GetNextEvent--and call
  841. >> GetNextEvent frequently enough to be cooperative with the rest of the
  842. >> machine.  (And certainly frequently enough to notice whether the user
  843. >> has clicked your Cancel button--we all have one for long operations,
  844. >> right?--or presses cmd-. --we do check for that, right?)
  845. >
  846. >I must admit I look on command-period as one of those slightly arcane
  847. >things that not every Mac user necessarily knows about. I prefer putting
  848. >up a dialog box with a "Stop" or "Cancel" button on it (whichever is
  849. >appropriate), that the user can click, and I don't bother checking for
  850. >command-period at all. Or command-full-stop, as some of us may prefer to call
  851. >it :-).
  852.  
  853. I tend to disagree.  True, a Stop or Cancel button is always best.  If you
  854. have one, then you really should check for Command-period and Escape.
  855. (And you should be checking for Command-period the right way, so it works
  856. on international systems.)  The guidelines practically make this a law
  857. for dialogs.  (Gee, sounds like I work for DTS.  :-)  :-(  )
  858.  
  859. Since most programs display a window that says something like "To cancel
  860. printing, type Command-period (.)", I don't think it's that arcane.  Users
  861. get the connection after a while, especially if it's in your documentation,
  862. even more especially if it's in a list of shortcuts.  (Everyone loves
  863. shortcuts; there's a great sense of satisfaction even if they don't save
  864. that much work.  On the other hand, shortcuts are no excuse for a lousy
  865. interface.)  Escape is somewhat natural to IBM converts.
  866.  
  867. >In a couple of the programs I've written, I have a sort of "usertask"
  868. >routine that gets called once around every loop. This usertask then
  869. >checks the value of TickCount against a previous call, and only spins
  870. >the cursor and calls Get/WaitNextEvent if at least 6 ticks (0.1 second)
  871. >have elapsed. This causes the cursor to spin smoothly, regardless of how
  872. >fast the loops are executing, while hopefully keeping to a minimum the
  873. >CPU overhead involved in doing so. And it's a good way to spot places
  874. >where I forgot to call my usertask, as when the program gets to such a
  875. >place, the cursor animation starts to become jerky.
  876. >
  877. >I've found that clicking a "Stop" button and having it respond in a
  878. >maximum of 0.1 second seems pretty much instantaneous.
  879.  
  880. Your mileage will, of course, vary.  I find that 10 ticks for cursor spin,
  881. 15 ticks for WaitNextEvent, and 60 ticks for updating the numbers in the
  882. status dialog are sufficient.  The response is good and I prefer to have
  883. the machine look like it is really grinding away when it really is.
  884.  
  885. You're absolutely right in mentioning that the cursor spin is good feedback
  886. for where to place calls.  Since it's tick-based, calling it too much
  887. doesn't hurt, but not calling it enough is obvious in the cursor.  Yet
  888. another reason not to use a VBL task...
  889.  
  890. +++
  891. Lloyd Lim     Internet: lim@iris.cs.ucdavis.edu
  892.               America Online: LimUnltd
  893.               Compuserve: 72647,660
  894.               US Mail: 224 Lysle Leach Hall, U.C. Davis, Davis, CA 95616
  895.  
  896.  
  897.  
  898. - -------------------------
  899.  
  900. From: keith@Apple.COM (Keith Rollin)
  901. Subject:  Animated cursors
  902. Date: 30 Jan 92 22:35:27 GMT
  903. Organization: Apple Computer Inc., Cupertino, CA
  904.  
  905. In article <47010@hydra.gatech.EDU> gt0657c@prism.gatech.EDU (geoff george) writes:
  906. >
  907. >I spent most of one day looking for Apple's recommended method of 
  908. >animating cursors, since IM VI User Interface Guidelines say that 
  909. >any decent app should at least use the spinning beach ball or 
  910. >spinning watch. Nada. I found this very annoying - "You must do 
  911. >so-and-so, but we won't tell you how, or support your doing so 
  912. >in any way." No docs on the Finder's 'acur' (I think it is) 
  913. >resources, although ResEdit knows about them. 
  914. >
  915. >Maybe this just has to do with the indices to IM and the various 
  916. >manifestations of the TechNotes being poor.
  917. >
  918. >Anyone got any pointers?
  919.  
  920. If you are using MPW, you can use the CursorCtl library that is
  921. provided. The MPW documentation documents the calls in this library,
  922. and describes how to use the 'acur' resource.
  923.  
  924. If you are using THINK whatever, I believe that you will have to write
  925. your own animated cursor routines. In that case, the entry you want to
  926. look up in Apple's documentation is SetCursor. There's no magic. Simply
  927. call SetCursor with a different cursor at regular intervals.
  928.  
  929. (Side note: It really upsets me that people have to ask this question
  930. all the time. First, it upsets me that people can't figure out on their
  931. own how to spin a cursor. It's just not that hard. GetCursor,
  932. SetCursor, repeat. What's so tough? Second, most people on this net use
  933. THINK C or THINK Pascal, neither of which include the spinning cursor
  934. libraries (someone please correct me if I'm wrong). Apple provides
  935. Symantec with its headers and libraries. I assume that that includes
  936. the CursorCtl library. If so, then shame on Symantec for not releasing it.
  937. If not, then shame on Apple for not providing the library to Symantec, and
  938. shame on Symantec for not providing a replacement library.)
  939.  
  940. -- 
  941. - ----------------------------------------------------------------------------
  942. Keith Rollin           ---            <Taligent .signature under construction>
  943. Disclaimer: Pretty soon, I really _won't_ be speaking for Apple...
  944.  
  945.  
  946.  
  947. - -------------------------
  948.  
  949. From: jverdega@cae.wisc.edu (Jeffrey Verdegan)
  950. Subject:  Animated cursors
  951. Date: 29 Feb 92 20:23:00 GMT
  952. Organization: Computer Aided Engineering, Univ. of Wisconsin-Madison
  953.  
  954. In article <62298@apple.Apple.COM> keith@Apple.COM (Keith Rollin) writes:
  955. >
  956. >(Side note: It really upsets me that people have to ask this question
  957. >all the time. First, it upsets me that people can't figure out on their
  958. >own how to spin a cursor. It's just not that hard. GetCursor,
  959. >SetCursor, repeat. What's so tough? Second, most people on this net use
  960.  
  961. To rise to the defense of those of us who asked the question, please, give us
  962. some credit.  You're right, it's not that tough, and GetCursor, SetCursor, etc.
  963. was how I was going to do it, when I remembered that there was an 'acur' 
  964. resource. "Hmmm.  Maybe 'acur' is 'animated cursor.'  Maybe there's a good
  965. reason it's there, and I should do it that way.  There are warnings in Mac
  966. programming books about not setting some things directly, but rather using the
  967. routines provided.  Maybe this is one of those."  So, I posted to c.s.m.p to
  968. find out how to get animated cursors using 'acur,' and found out that there 
  969. is no reasonable way in THINK (as you pointed out), at which point I decided
  970. to just do it with Get and Set.  
  971.  
  972. The point is, I *did* think of it, but I had good reason to believe there was
  973. an "officially sanctioned and approved" way of doing it, and I'll bet some of
  974. the others who posted the same question were thinking along the same lines.
  975.  
  976.  
  977. Jeff
  978.  
  979.  
  980. - --------
  981.  
  982. Jeff Verdegan
  983. University of Wisconsin-Madison
  984. Computer-Aided Engineering Center
  985. jjv@caestaff.engr.wisc.edu
  986. (608) 263-1875
  987.  
  988.  
  989.  
  990. - -------------------------
  991.  
  992. From: gt0657c@prism.gatech.EDU (geoff george)
  993. Date: 5 Mar 92 05:06:56 GMT
  994. Organization: Georgia Institute of Technology
  995.  
  996. In article <1992Feb29.142301.15085@doug.cae.wisc.edu> jverdega@cae.wisc.edu 
  997. (Jeffrey Verdegan) writes:
  998. >In article <62298@apple.Apple.COM> keith@Apple.COM (Keith Rollin) writes:
  999.  
  1000. >>(Side note: It really upsets me that people have to ask this question
  1001. >>all the time. First, it upsets me that people can't figure out on their
  1002. >>own how to spin a cursor. It's just not that hard. GetCursor,
  1003. >>SetCursor, repeat. What's so tough? Second, most people on this net use
  1004.  
  1005. >... "Hmmm.  Maybe 'acur' is 'animated cursor.'  Maybe there's a good
  1006. >reason it's there, and I should do it that way.  There are warnings in Mac
  1007. >programming books about not setting some things directly, but rather using
  1008. >the routines provided.  Maybe this is one of those." ...
  1009.  
  1010. >The point is, I *did* think of it, but I had good reason to believe there was
  1011. >an "officially sanctioned and approved" way of doing it, and I'll bet some of
  1012. >the others who posted the same question were thinking along the same lines.
  1013.  
  1014. >Jeff
  1015.  
  1016.  
  1017.  
  1018. Yes, Jeff, that was exactly my line of reasoning when I posted the original 
  1019. question that started off this thread. In my compulsive way, I was trying to 
  1020. think of not _a_ way to do it, but _the best_, or at least an Apple-approved, 
  1021. way to do it. The phrasing in IM VI certainly gave me the impression that 
  1022. there was one of the last.
  1023.  
  1024. geoff
  1025. - -- 
  1026. geoff george    geoff@cc.gatech.edu        (my name)
  1027.         or    gt0657c@prism.gatech.edu   (personal warmth from GaTech OCS)
  1028.  
  1029. "Ordinary f---ing people - I hate 'em. Ordinary person spends his life avoiding tense situations; repo man spends his life getting INTO tense situations."
  1030.  
  1031. ---------------------------
  1032.  
  1033. End of C.S.M.P. Digest
  1034. **********************
  1035.